<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
body,div,ul,li,ol,dl,dt,p,dd,img,input,a,span,h1,h2,h3,h4{padding:0; margin:0; border:0; list-style:none;}

.all{ width:332px; height:245px; border:1px solid #ccc; margin:100px auto;}
.all ul{ height:41px;}
.all ul li{ float:left; height:40px; line-height:40px; border-bottom:1px solid #ccc; border-right:1px solid #ccc; width:110px; text-align:center; background:#f9f9f9;} 
.all ul li a{ width:100%; height:100%; display:block;}
.all ul li.first{ background:#fff; border-bottom:1px solid #fff;}
.all ul a{ text-decoration:none;  font-family:"黑体"; color:#3d535e; font-size:16px;}
.all div{ margin:10px auto; width:292px; display:none;}
.all div.first{ display:block;}
</style>

</head>

<body>
	<div id="box" class="all">
		<ul id="oul">
			<li class="first"><a href="#">去大肚子</a></li>
			<li><a href="#">清除色斑</a></li>
			<li style=" border-right:0;"><a href="#">男性减肥</a></li>
		</ul>
		<div class="first">
        	<a href="#"><img src="images/img1.jpg" alt="" /></a>
        </div>
		<div>
        	<a href="#"><img src="images/img2.jpg" alt="" /></a>
        </div>
		<div>
        	<a href="#"><img src="images/img3.jpg" alt="" /></a>
        </div>
	</div>
</body>
</html>
<script type="text/javascript">

	var box=document.getElementById('box');
	var oul=document.getElementById('oul');
	var lis=oul.getElementsByTagName('li');
	var odivs=box.getElementsByTagName('div');

	for(var i=0;i<lis.length;i++){
		lis[i].index=i;
		lis[i].onmouseover=function(){
			for(var i=0;i<lis.length;i++){
				lis[i].className=''
				odivs[i].className=''
			}
			this.className='first';
			odivs[this.index].className='first'
		}
	}

</script>
